
// 基于template/src/views/{{appModules}}/{{pages@DEPICKUPGRIDVIEW}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	PickupGridViewActionType,
	PickupGridViewController,
	IPickupGridViewAbility,
	IPickupGridViewControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	usePickupGridViewProps,
	usePickupGridViewBasic,
	usePickupGridViewControllerParams,
    usePickupGridViewAction,
} from '@/hooks/view/use-pickup-grid-view';
import { model } from "./ibiz-customer-intf-pickup-grid-view-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...usePickupGridViewProps()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...usePickupGridViewBasic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...usePickupGridViewAction(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<PickupGridViewActionType, IPickupGridViewAbility>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<PickupGridViewActionType, IPickupGridViewAbility>>
) {
	const params: IPickupGridViewControllerParams<
		PickupGridViewActionType,
		IPickupGridViewAbility
	> = usePickupGridViewControllerParams(model, props, evt);
	return new PickupGridViewController(params);
}